<template>
    <div>
        <div class="book_title">
            <h1 align="center">盘点记录</h1>
        </div>
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>系统中心</el-breadcrumb-item>
            <el-breadcrumb-item>盘点记录</el-breadcrumb-item>
        </el-breadcrumb>
        <hr>
        <br>
        <el-table
                :data="inventoryRecord"
                height="250"
                border
                style="width: 100%">

            <el-table-column prop="id" label="编号" width="130"></el-table-column>
            <el-table-column prop="bookName" label="图书名称" width="130"></el-table-column>
            <el-table-column prop="realName" label="盘点人员名称" width="130"></el-table-column>
            <el-table-column prop="inventoryNum" label="实际盘点量" width="130"></el-table-column>
            <el-table-column prop="exceedLack" label="超出缺少量" width="130"></el-table-column>
            <el-table-column label="完成时间" width="130">
                <template slot-scope="scope">
                    <span v-if="scope.row.finishTime==null">未完成</span>
                    <span v-if="scope.row.finishTime!=null">{{scope.row.finishTime | datefmt('YYYY/MM/DD')}}</span>
                </template>
            </el-table-column>

        </el-table>
    </div>
</template>

<script>
    export default {
        name: "findInventoryRecordList",
        data(){
            return{
                inventoryRecord:[]
            }
        },
        methods:{
            findInventoryRecordList:function () {
              this.$http.post('/findInventoryRecordList').then((res)=>{
                console.log(res)
                    if (res.data.success){
                      this.inventoryRecord=res.data.result.inventoryRecordList;
                    } else {
                      this.$message.error(res.data.message)
                    }
                })
            }
        },
        mounted() {
            this.findInventoryRecordList();
        }
    }
</script>

<style scoped>

</style>
